﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 控制台数据流输出
{
    public class 获取控制台数据
    {
        /// <summary>
        /// 输出
        /// </summary>
        System.IO.TextWriter outPut = Console.Out;
        //输入
        System.IO.TextReader input = Console.In;

        /// <summary>
        /// 设置可以输出的网络流
        /// </summary>
        public void Start()
        {
            //设置从NetWork
            NetWorkStreamWriter st = new NetWorkStreamWriter(Console.OpenStandardOutput(), Console.Out.Encoding);
            Console.SetOut(st);
            //初始化服务端
            var d = ConsoleHelper.NetWorkStreamWriter;

        }

        public void Test()
        {
            Console.WriteLine("sdfsdfdsfds");
        }
    }
}
